<%= render :partial => 'layouts/header' %>
<!--主体-->
<div id="main">
  <div id="content" class="float_left">
    <div id="view_type">
      <% if show_list_type? %>
        <%= link_to image_tag("liebiao.gif",:alt => "列表", :title => "按列表查看",:class => "view_img"), post_list_url %>
        <%= link_to image_tag("miangxi.gif",:alt => "明细", :title => "按列表查看",:class => "view_img"), '/' %>
      <% end %>
    </div>
    <%= yield %>
  </div>
  <!--右侧widget-->
  <div id="widget" class="float_right">
    <% cache(RecordSweeper::PATH.merge(:action_suffix => 'category_tree')) do %>
      <%= render :partial => "categories/category_tree", :local => {:categories => @categories} %>
    <% end %>
    <% cache(RecordSweeper::PATH.merge(:action_suffix => 'recent_comments')) do %>
      <%= render :partial => "comments/recent_comments", :local => {:recent_comments => @recent_comments} %>
    <% end %>
    <%= render :partial => "posts/search_form" %>
    <% cache(RecordSweeper::PATH.merge(:action_suffix => 'archive_tree')) do %>
      <%= render :partial => "site/archive_tree" %>
    <% end %>
    <% cache(RecordSweeper::PATH.merge(:action_suffix => 'friend_links')) do %>
      <%= render :partial => "friend_links/friend_links", :local => {:friend_links => @friend_links} %>
    <% end %>
    <% cache(RecordSweeper::PATH.merge(:action_suffix => 'recent_visited_users')) do %>
      <%= render :partial => "users/recent_visited_users", :local => {:recent_visited_users => @recent_visited_users} %>
    <% end %>
    <% cache(RecordSweeper::PATH.merge(:action_suffix => 'show_widgets')) do %>
      <%= render :partial => "widgets/show_widgets", :local => {:show_widgets => @show_widgets} %>
    <% end %>
  </div>
</div>
<%= render :partial => 'layouts/footer' %>